#include <iostream>
#include <unistd.h>

int main()
{
  pid_t pid = fork();
  if(pid == 0){
    printf("i am child, pid = %d, ppid = %d\n", pid, getppid());
    while(1);
  }else{
    printf("i am parent, pid = %d, ppid = %d\n", pid, getppid());
    while(1);
  }
}
